******************************************************************************************
* Replication file for 

* Title:		The Racialized Pandemic: Wave One of Covid-19 and the Reproduction of Global North Inequalities
* Authors:	Gerda Hooijer and Desmond King
* Contact:	g.hooijer@ucl.ac.uk
* Date: 		May 16, 2021
******************************************************************************************

* This file reproduces the figures in the paper.

version 16
set more off

// set directory
cd "insert link to folder"

*** Figure 1 ***

use data_1, clear 
keep if time>156 // keep observations from January 2019 onwards

* (1a) United States
twoway line us_white time, lcolor(gs0) lpattern(solid) lwidth(medthick) || line us_latino time, lpattern(shortdash) lwidth(medthick) lcolor(gs0) || line us_black time, lpattern(longdash) lwidth(medthick) lcolor(gs0) scheme(s1color) legend(label(1 "White") label(2 "Hispanic") label(3 "African American") row(1) region(lwidth(none))) xlabel(157 159 162 165 168 171 174, valuelabel labsize(.3cm)) xtitle(" ") ylabel(0(5)22) yscale(titlegap(+3)) ytitle("Unemployment rate", size(med)) title("(a) United States", size(med)) xline(171, lcolor(gs0)) text(21 171 "Pandemic  ", place(west) size(.3cm))

graph export Hooijer_Fig1a, as(pdf) replace

* (1b) United Kingdom
twoway line uk_white time, lcolor(gs0) lpattern(solid) lwidth(medthick) || line uk_bame time, lpattern(longdash) lwidth(medthick) lcolor(gs0) scheme(s1color) legend(label(1 "White") label(2 "Ethnic minority") row(1) region(lwidth(none))) xlabel(157 159 162 165 168 171 174, valuelabel labsize(.3cm)) xtitle(" ") ylabel(0(5)22) yscale(titlegap(+3)) ytitle("Unemployment rate", size(med)) title("(b) United Kingdom", size(med)) xline(171, lcolor(gs0)) text(21 171 "Pandemic  ", place(west) size(.3cm))

graph export Hooijer_Fig1b, as(pdf) replace

* (1c) Netherlands
twoway line nl_native time, lcolor(gs0) lpattern(solid) lwidth(medthick) || line nl_western_migrant time, lpattern(shortdash) lwidth(medthick) lcolor(gs0) || line nl_nonwestern_migrant time, lpattern(longdash) lwidth(medthick) lcolor(gs0) scheme(s1color) legend(label(1 "Native") label(2 "Western") label(3 "Non-Western") row(1) region(lwidth(none))) xlabel(157 159 162 165 168 171 174, valuelabel labsize(.3cm)) xtitle(" ") ylabel(0(5)22) yscale(titlegap(+3)) ytitle("Unemployment rate", size(med)) title("(c) Netherlands", size(med)) xline(171, lcolor(gs0)) text(21 171 "Pandemic  ", place(west) size(.3cm))

graph export Hooijer_Fig1c, as(pdf) replace

* (1d) Sweden
twoway line se_total_nat time, lcolor(gs0) lpattern(solid) lwidth(medthick) || line se_total_fb time, lpattern(longdash) lwidth(medthick) lcolor(gs0) scheme(s1color) legend(label(1 "Native-born") label(2 "Foreign-born") row(1) region(lwidth(none))) xlabel(157 159 162 165 168 171 174, valuelabel labsize(.3cm)) xtitle(" ") ylabel(0(5)22) yscale(titlegap(+3)) ytitle("Unemployment rate", size(med)) title("(d) Sweden", size(med)) xline(171, lcolor(gs0)) text(21 171 "Pandemic  ", place(west) size(.3cm))

graph export Hooijer_Fig1d, as(pdf) replace



*** Figure 2 ***

use data_1, clear 
keep if time>156 // keep observations from January 2019 onwards
 
twoway line us_unemp_gap time, lcolor(gs0) lpattern(solid) lwidth(medthick) || line uk_unemp_gap time, lcolor(gs0) lpattern(shortdash) lwidth(medthick) || line nl_unemp_gap time, lcolor(gs0) lpattern(longdash) lwidth(medthick) || line se_unemp_gap time, lcolor(gs0) lpattern(longdash_dot) lwidth(medthick) scheme(s1color)  legend(label(1 "US") label(2 "UK") label(3 "Netherlands") label(4 "Sweden") row(1) region(lwidth(none))) xlabel(157 159 162 165 168 171 174, valuelabel labsize(.3cm)) xtitle(" ") ylabel(0(4)17) yscale(titlegap(+3)) ytitle("Racial-ethnic gap in unemployment", size(med)) title(" ") xline(171, lcolor(gs0)) text(17 171 "Pandemic  ", place(west) size(.25cm))

graph export Hooijer_Fig2, as(pdf) replace



*** Figure 3 ***

* (3a) United States

use data_2, clear 

twoway (scatter proximity_soc HispanicorLatino, msize(small) mcolor(gs0)) (lfit proximity_soc HispanicorLatino, lcolor(black)), xtitle("% Hispanics in occupation") xscale(titlegap(+3)) ylabel(0(20)100) yscale(titlegap(+3)) ytitle("Physical proximity to others in occupation") title("(a) United States") legend(off) scheme(s1color) plotregion(style(none))

graph export Hooijer_Fig3a, as(pdf) replace

* (3b) United Kingdom 

use data_3, clear

twoway (scatter Proximitytoothers bame, msize(small) mcolor(gs0) msymbol(T)) (lfit Proximitytoothers bame, lcolor(black)), xtitle("% Ethnic minorities in occupation") xscale(titlegap(+3)) ylabel(0(20)100) yscale(titlegap(+3)) ytitle("Physical proximity to others in occupation") title("(b) United Kingdom") legend(off) scheme(s1color) plotregion(style(none)) 

graph export Hooijer_Fig3b, as(pdf) replace



*** Figure 4 ***

use data_4, clear

twoway line uk_white_pct month, lcolor(gs0) lpattern(solid) lwidth(medthick) || line uk_minority_pct month, lcolor(gs0) lpattern(shortdash) lwidth(medthick) || line nl_native_pct month, lcolor(gs0) lpattern(longdash) lwidth(medthick) || line nl_nonwestern_pct month, lcolor(gs0) lpattern(shortdash_dot) lwidth(medthick) scheme(s1color)  legend(label(1 "UK - White") label(2 "UK - Ethnic minority") label(3 "NL - Native") label(4 "NL - Non-Western") row(2) region(lwidth(none))) xlabel(1 "2019M1" 6 "2019M6" 12 "2019M12" 18 "2020M6", valuelabel labsize(.3cm)) xtitle(" ") ylabel(0(20)100) yscale(titlegap(+3)) ytitle("Unemployment benefit receipt (%)", size(med)) title(" ") xline(15, lcolor(gs0)) text(90 15 "Pandemic  ", place(west) size(.3cm))

graph export Hooijer_Fig4, as(pdf) replace



*** Figure 5 ***

use data_1, clear

* (5a) United States
twoway line us_white time, lcolor(gs0) lpattern(solid) lwidth(medthick) || line us_latino time, lpattern(shortdash) lwidth(medthick) lcolor(gs0) || line us_black time, lpattern(longdash) lwidth(medthick) lcolor(gs0) scheme(s1color) legend(label(1 "White") label(2 "Hispanic") label(3 "African American") row(1) region(lwidth(none))) xlabel(1 25 49 73 97 121 145 169, valuelabel labsize(small)) xtitle(" ") ylabel(0(5)22) yscale(titlegap(+3)) ytitle("Unemployment rate", size(med)) title("(a) United States", size(med)) xline(33 171, lcolor(gs0)) text(21 33 "2008 crisis  ", place(west) size(.3cm)) text(21 171 "Pandemic  ", place(west) size(.3cm))

graph export Hooijer_Fig5a, as(pdf) replace

* (5b) United Kingdom
twoway line uk_white time, lcolor(gs0) lpattern(solid) lwidth(medthick) || line uk_bame time, lpattern(longdash) lwidth(medthick) lcolor(gs0) scheme(s1color) legend(label(1 "White") label(2 "Ethnic minority") row(1) region(lwidth(none))) xlabel(1 25 49 73 97 121 145 169, valuelabel labsize(small)) xtitle(" ") ylabel(0(5)22) yscale(titlegap(+3)) ytitle("Unemployment rate", size(med)) title("(b) United Kingdom", size(med)) xline(33 171, lcolor(gs0)) text(21 33 "2008 crisis  ", place(west) size(.3cm)) text(21 171 "Pandemic  ", place(west) size(.3cm))

graph export Hooijer_Fig5b, as(pdf) replace

* (5c) Netherlands
twoway line nl_native time, lcolor(gs0) lpattern(solid) lwidth(medthick) || line nl_western_migrant time, lpattern(shortdash) lwidth(medthick) lcolor(gs0) || line nl_nonwestern_migrant time, lpattern(longdash) lwidth(medthick) lcolor(gs0) scheme(s1color) legend(label(1 "Native") label(2 "Western") label(3 "Non-Western") row(1) region(lwidth(none))) xlabel(1 25 49 73 97 121 145 169, valuelabel labsize(small)) xtitle(" ") ylabel(0(5)22) yscale(titlegap(+3)) ytitle("Unemployment rate", size(med)) title("(c) Netherlands", size(med)) xline(33 171, lcolor(gs0)) text(21 33 "2008 crisis  ", place(west) size(.3cm)) text(21 171 "Pandemic  ", place(west) size(.3cm))

graph export Hooijer_Fig5c, as(pdf) replace

* (5d) Sweden
twoway line se_total_nat time, lcolor(gs0) lpattern(solid) lwidth(medthick) || line se_total_fb time, lpattern(longdash) lwidth(medthick) lcolor(gs0) scheme(s1color) legend(label(1 "Native-born") label(2 "Foreign-born") row(1) region(lwidth(none))) xlabel(1 25 49 73 97 121 145 169, valuelabel labsize(small)) xtitle(" ") ylabel(0(5)22) yscale(titlegap(+3)) ytitle("Unemployment rate", size(med)) title("(d) Sweden", size(med)) xline(21 171, lcolor(gs0)) text(21 33 "2008 crisis  ", place(west) size(.3cm)) text(21 171 "Pandemic  ", place(west) size(.3cm))

graph export Hooijer_Fig5d, as(pdf) replace